 {
        
     cc.Class({
            extends: cc.Component,
            properties: {
                isPeng: !0,
                seatId: 0,
                nodes: {
                    default: [],
                    type: [cc.Node]
                },
                _pattern: null,
                _yellowValue: -1
            },
            onLoad: function () {
                Global.notificationCenter.on(Global.eventName.GAME_RESET_TILE_YELLOW, this._onResetYellowTile.bind(this), this),
                    Global.notificationCenter.on(Global.eventName.GAME_UPDATE_SELECT_TILE, this._onSelected.bind(this), this);
            },
            start: function () {
            },
            bindData: function (e) {
                if (this._pattern = e, 1 == this.isPeng) for (var t = 0; t < 3; t++) {
                    var n = (s = this.nodes[t]).getChildByName("spTile"), o = "", i = null;
                    this.seatId == Global.config.SEAT_DOWN && (i = "Texture/mj_az_tiles", o = "mj_az_02_"),
                    this.seatId == Global.config.SEAT_RIGHT && (i = "Texture/mj_ar_tiles", o = "mj_ar_02_"),
                    this.seatId == Global.config.SEAT_UP && (i = "Texture/mj_ad_tiles", o = "mj_ad_01_"),
                    this.seatId == Global.config.SEAT_LEFT && (i = "Texture/mj_al_tiles", o = "mj_al_02_");
                    var a = o + e[t], r = n.getComponent("cc.Sprite");
                    Global.spriteAtlas.setSpriteFrame(r, i, a);
                } else for (t = 0; t < 4; t++) {
                    var s, l = (s = this.nodes[t]).getChildByName("spBg");
                    n = s.getChildByName("spTile");
                    if (e && 0 == e.style) {
                        a = "", o = "", i = null;
                        if (this.seatId == Global.config.SEAT_DOWN && (i = "Texture/mj_az_tiles", o = "mj_bz_01"),
                        this.seatId == Global.config.SEAT_RIGHT && (i = "Texture/mj_ar_tiles", o = "mj_br_01"),
                        this.seatId == Global.config.SEAT_UP && (i = "Texture/mj_ad_tiles", o = "mj_bd_02"),
                        this.seatId == Global.config.SEAT_LEFT && (i = "Texture/mj_al_tiles", o = "mj_bl_01"),
                            a = o, 3 != t) {
                            r = l.getComponent("cc.Sprite");
                            Global.spriteAtlas.setSpriteFrame(r, i, a), n.active = !1;
                        } else {
                            o = "", i = null;
                            this.seatId == Global.config.SEAT_DOWN && (i = "Texture/mj_az_tiles", o = "mj_az_02_"),
                            this.seatId == Global.config.SEAT_RIGHT && (i = "Texture/mj_ar_tiles", o = "mj_ar_02_"),
                            this.seatId == Global.config.SEAT_UP && (i = "Texture/mj_ad_tiles", o = "mj_ad_01_"),
                            this.seatId == Global.config.SEAT_LEFT && (i = "Texture/mj_al_tiles", o = "mj_al_02_");
                            a = o + e.pattern[t], r = n.getComponent("cc.Sprite");
                            Global.spriteAtlas.setSpriteFrame(r, i, a);
                        }
                    } else {
                        o = "", i = null;
                        this.seatId == Global.config.SEAT_DOWN && (i = "Texture/mj_az_tiles", o = "mj_az_02_"),
                        this.seatId == Global.config.SEAT_RIGHT && (i = "Texture/mj_ar_tiles", o = "mj_ar_02_"),
                        this.seatId == Global.config.SEAT_UP && (i = "Texture/mj_ad_tiles", o = "mj_ad_01_"),
                        this.seatId == Global.config.SEAT_LEFT && (i = "Texture/mj_al_tiles", o = "mj_al_02_");
                        a = o + e.pattern[t], r = n.getComponent("cc.Sprite");
                        Global.spriteAtlas.setSpriteFrame(r, i, a);
                    }
                }
            },
            update: function (e) {
                var t = this._pattern;
                if (1 == this.isPeng) for (var n = 0; n < 3; n++) {
                    var o = (a = this.nodes[n]).getChildByName("spBg"), i = a.getChildByName("spTile");
                    t[n] == this._yellowValue ? this.setYellow(i, o) : this.setWhite(i, o);
                } else for (n = 0; n < 4; n++) {
                    var a;
                    o = (a = this.nodes[n]).getChildByName("spBg"), i = a.getChildByName("spTile");
                    if (t && 0 == t.style) {
                        if (3 == n) t.pattern[n] == this._yellowValue ? this.setYellow(i, o) : this.setWhite(i, o);
                    } else t.pattern[n] == this._yellowValue ? this.setYellow(i, o) : this.setWhite(i, o);
                }
            },
            setWhite: function (e, t) {
                e && (e.color = cc.color(255, 255, 255, 255)), t && (t.color = cc.color(255, 255, 255, 255));
            },
            setYellow: function (e, t) {
                e && (e.color = cc.color(205, 216, 75, 255)), t && (t.color = cc.color(205, 216, 75, 255));
            },
            _onResetYellowTile: function () {
                this._yellowValue = -1;
            },
            _onSelected: function (e) {
                this._yellowValue = e.tileValue;
            }
        })
    }